package xyz.coolcsm.security.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 什锦
 * @since 2021-06-1
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_question")

public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    //自增id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //问题题目
    private String title;

    //问题内容
    private String content;

    //是否解决
    private Integer status;

    //1 置顶 0普通
    private Integer sort;

    //浏览量
    private Integer views;

    //作者id
    private String authorId;

    //作者名字
    private String authorName;

    //作者头像
    private String authorAvatar;

    //问题分类
    private Integer cid;


    @Version //乐观锁Version注解
    private Integer version;

    @TableLogic//逻辑删除
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)//自动填充
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
